from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
        Node(
            package='rm_detector',
            executable='rm_detector_node',
            name='rm_detector_node',
            output='screen',
            parameters=[
                {'input_topic': '/image_raw'},
                {'output_topic': '/armor_detection/image_raw'},
                {'video_path': ''}
            ],
            remappings=[
                ('/camera/image_raw', '/temp_video_frame')  # 让视频帧直接发到这个话题
            ]
        ),
        Node(
            package='image_transport',
            executable='republish',
            name='video_republish',
            arguments=['raw', 'raw'],
            remappings=[]
        )
    ])